/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package todotask.Adapters;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import todotask.view.TaskProperties;

/**
 *
 * @author dakota
 */
public class NuevaTareaAdapter extends MouseAdapter {

    private JFrame parent;

    public NuevaTareaAdapter(JFrame parent) {
        this.parent = parent;
    }

    @Override
    public void mouseClicked(MouseEvent me) {
        JDialog nuevaTarea = new JDialog(parent, "Nueva Tarea", true);
        nuevaTarea.add(new TaskProperties(nuevaTarea));
        nuevaTarea.pack();
        nuevaTarea.setLocationRelativeTo(parent);
        nuevaTarea.setVisible(true);
        nuevaTarea.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

    }
}
